package sharedObjects;

import java.io.Serializable;
import java.util.ArrayList;

public class ShipStorage implements Serializable{
	public ArrayList<Ships> ships = new ArrayList<Ships>();
        public Ships getShipByFieldID(int id){
            for(int i = 0; i < ships.size();i++){
                for (int j = 0; i < ships.get(i).shipfieldList.size(); i++){
                    if (ships.get(i).shipfieldList.get(j).getId() == id){
                        return ships.get(i);
                    }
                }
            }
        return null;
            
        }
}
